* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 登录页面样式 */
.login-form {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    max-width: 400px;
    margin: 100px auto;
    text-align: center;
}

.login-form h1 {
    margin-bottom: 30px;
    color: #4a5568;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

button {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

button:hover {
    background: #5a6fd8;
}

.error-message {
    color: #e53e3e;
    margin-top: 15px;
    padding: 10px;
    background: #fed7d7;
    border-radius: 5px;
    display: none;
}

/* 通话页面样式 */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-secondary {
    background: #718096;
}

.btn-secondary:hover {
    background: #4a5568;
}

main {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

.call-container {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.video-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.video-wrapper {
    text-align: center;
}

.video-wrapper h3 {
    margin-bottom: 10px;
    color: #4a5568;
}

video {
    width: 100%;
    max-width: 400px;
    height: 300px;
    background: #1a202c;
    border-radius: 8px;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-control {
    background: #48bb78;
}

.btn-control:hover {
    background: #38a169;
}

.btn-control.muted {
    background: #e53e3e;
}

.btn-hangup {
    background: #e53e3e;
}

.btn-hangup:hover {
    background: #c53030;
}

.btn-hangup:disabled {
    background: #a0aec0;
    cursor: not-allowed;
}

.user-list-container {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    height: fit-content;
}

.user-list-container h3 {
    margin-bottom: 15px;
    color: #4a5568;
}

.user-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.user-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #f7fafc;
    border-radius: 5px;
    border-left: 4px solid #667eea;
}

.user-item .call-btn {
    background: #4299e1;
    padding: 8px 16px;
    font-size: 14px;
}

.user-item .call-btn:hover {
    background: #3182ce;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    min-width: 300px;
}

.modal-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.btn-accept {
    background: #48bb78;
}

.btn-accept:hover {
    background: #38a169;
}

.btn-reject {
    background: #e53e3e;
}

.btn-reject:hover {
    background: #c53030;
}

/* 通话状态显示 */
.call-status {
    background: rgba(255, 255, 255, 0.9);
    padding: 10px 15px;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    color: #333;
    margin-bottom: 15px;
    border: 2px solid #667eea;
}

/* 用户列表状态样式 */
.user-item.in-call {
    background: #ffe6e6;
    border-left: 4px solid #dc3545;
}

.user-item.available {
    background: #e6ffe6;
    border-left: 4px solid #28a745;
}

.user-name {
    font-weight: 500;
    color: #333;
}

.user-status {
    font-size: 12px;
    color: #666;
    margin-left: 8px;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.in-call {
    background: #dc3545;
    color: white;
}

/* 远程用户信息显示 */
.remote-user-info {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    z-index: 10;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.user-avatar {
    font-size: 16px;
    background: #667eea;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-name-display {
    font-weight: 600;
    color: #fff;
}

/* 视频标题样式 */
.video-wrapper h3 {
    position: absolute;
    top: 10px;
    left: 10px;
    color: white;
    background: rgba(0, 0, 0, 0.7);
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 14px;
    z-index: 5;
    backdrop-filter: blur(5px);
}

/* 响应式设计 */
@media (max-width: 768px) {
    main {
        grid-template-columns: 1fr;
    }
    
    .video-container {
        grid-template-columns: 1fr;
    }
    
    header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}